const express = require('express');
const router = express.Router();
const strategyController = require('../controllers/strategy');

// 获取策略列表
router.get('/', strategyController.getStrategies);

// 获取单个策略
router.get('/:id', strategyController.getStrategyById);

// 创建策略
router.post('/', strategyController.createStrategy);

// 更新策略
router.put('/:id', strategyController.updateStrategy);

// 删除策略
router.delete('/:id', strategyController.deleteStrategy);

// 回测策略
router.post('/:id/backtest', strategyController.backtestStrategy);

// 启动策略
router.post('/:id/start', strategyController.startStrategy);

// 停止策略
router.post('/:id/stop', strategyController.stopStrategy);

module.exports = router;